import "@babel/polyfill";

import BackgroundScene from "./scenes/backgroundScene.js";
import Phaser from "phaser";

const DEFAULT_WIDTH = 1280;
const DEFAULT_HEIGHT = 720;

const config = {
    type: Phaser.CANVAS,
    scale: {
        parent: "phaser-game",
        mode: Phaser.Scale.FIT,
        autoCenter: Phaser.Scale.CENTER_BOTH,
        width: DEFAULT_WIDTH,
        height: DEFAULT_HEIGHT,
    },
    scene: [BackgroundScene],
    physics: {
        default: "arcade",
        arcade: {
            debug: false,
            gravity: { x: 0, y: 0 },
        },
    },
};

window.addEventListener("load", () => {
    let game = new Phaser.Game(config);
});
